<?php

namespace Application\model;

use Cola\Model;

class ReportModel extends Model
{

    public function insertMonitorItem($rows)
    {
        $inserId = $this->db('_backdb')->insert($rows, 'gm_monitor_player_log');

        return $inserId;
    }

    public function updateMonitorItem($rows, $where)
    {
        return $this->db('_backdb')->update($rows, $where, 'gm_monitor_player_log');
    }

    public function insertFightResult($rows)
    {
        $inserId = $this->db('_backdb')->insert($rows, 'gm_fight_result_log');

        return $inserId;
    }

    public function checkNotify($name)
    {
        $sql = "select * from cfg_commond where `name` = '$name'";
        $res = $this->db('_backdb')->row($sql);
        if ($res) {
            return $res;
        }
        return false;
    }

    public function getMonitorItemInfo($where)
    {
        return $this->db('_backdb')->row("select * from gm_monitor_player_log where $where");
    }

    public function insertMonitorHero($rows)
    {
        $inserId = $this->db('_backdb')->insert($rows, 'gm_monitor_hero_log');

        return $inserId;
    }

}